Fixing Issues from Past Weeks

I started this week by fixing some of the problems from past weeks; I created a new FabISP programmer board and two new IDC ISP cables. They both worked perfectly!

New Board and Cables Testing New FabISP

Output Devices

Rob gave me an overview of all kinds of output devices that we have in the lab. I have chosen to use the unipolar stepper motor as a possible component for my final project, because I would need a motor that can turn to a specific location. This is the example of a unipolar stepper motor that I have been trying to follow this week:

Unipolar Stepper Motor Example

Rob also explained to me what pulse width modulation (PWM) is and how Field Effect Transistors (FETs) work. He also showed me how the inside of a unipolar stepper motor looks like:

Rob's Notes on PWM Rob's Notes on FETs Rob's Notes on Motor

Rob suggested that I use Neil's example board for unipolar stepper motors first before trying to create my own. So I started off by milling Neil's board found on our class webpage. Here is the list of components on this board and the finished board:

Components - Neil's Board Neil's Board Complete

I also asked Vincent for help. He showed me how to create a 2x2 header to power the board. I had to decide where to insert the red and black wires based on the design of the board, and use a snapper wire cutter (in this case, the 0.65 mm hole) to remove some of the plastic casing to expose the metal part. Here's a picture of the header and the tool I used:

Power Header Wire Snapper

I also followed Rob's example motor and inserted the colored wires into a 2x3 header to make the motor ready to connect to the board.

Unipolar Stepper Motor

Vincent also showed me how to use Neil's C code (also can be found on this week's page) in Arduino to program the board. Since the microcontroller on this board did not use an external clock, we changed the setting for the clock to "8 MHz internal":

Arduino Clock Setting

The motor did turn; but there were a couple of problems that I observed:

  1. The motor would work the way it was supposed to work only in lower voltages (less than 7V). Once the voltage increased, the motor stopped turning and went into a "shivering" motion. When the voltage was above a certain limit, roughly 9V, the motor stopped moving altogether.
  2. The MOSFETs became warm when the voltage was turned up. Below 7V, the temperature was about 70-80 oF, and above 7V, the temperature easily shot up to 110-120 oF. When the voltage was above 9V and the motor stopped moving, the MOSFETs became really hot and we could smell solder.

The video below illustrates these problems. I tried to change the voltages and measure the temperature of the MOSFETs:



Rob helped me debug the board. I tried replacing one of the MOSFETs which looked burnt from the outside; but the problem still persisted. We tried to compare his example board with the board I made, and noticed that in Rob's example board there was an extra load capacitor that was added between the VCC and the GND to remove noise. So we decided to give that a shot and add an extra 10uF capacitor to the board (on the lower right hand side of the board):

Rob's Modified Board

And this capacitor did the magic! The problem was resolved: the MOSFETs did not turn warm or hot at higher voltages, and the motor kept rotating even at higher voltages. Here's a video of motor in motion after the modification. The temperature of the MOSFETs stayed below 100 oF throughout:



I decided to incorporate this extra capacitor into my own design. I also wanted to add an LED that would turn on whenever the board was powered. I found Kate Mytty's page from last year; and she drew her own schematic based on Neil's board as well. So I used her schematic as a guide to name the pins. Here are the schematic and board views, the traces and the boarder of my own board:

Schematic of My Own Board Board View Traces Border

Here are the pictures of the list of components I used and the finished board:

My Board without Components My Board - Components My Board Complete

Then, with Oliver's help, I tried to understand Neil's C code and play with the statements in the "while" loop a little bit. My board programmed successfully and I got the motor to turn!

Codes in Arduino My Board Programmed

Special Note: Neil commented in class that the initial problems listed above could be due to the fact that the voltage was exceeding the voltage limit of the motor. Therefore, it is important to check the datasheet of the motor before deciding what voltage to supply. Another possibility was that the high voltage kept resetting the microcontroller; that's why incorporating the capacitor helped resolve the problem.

I still have to figure out how to make the motor turn to a particular position then stop or pause, as this will be relevant to my final project. I will try to study the codes more closely and see how to make further modifications. I will also try the stepper motor example codes in Arduino and see what those can do.

I wanted to thank Rob, Vincent, Oliver, Albert and Gabe (and his dog, Chewy) for their help and support! You guys are awesome!